package com.zhaopin.entity;

import com.fasterxml.jackson.annotation.*;

import java.io.Serializable;
import java.util.Date;

/***
 * @Author 徐庶   QQ:1092002729
 * @Slogan 致敬大师，致敬未来的你
 */
public class User implements Serializable {

    private static final long serialVersionUID = 1L;
//    @JsonIgnore
    private Integer id;

    @JsonProperty("uname")
    private String username;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String address;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",locale = "zh")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date birthday;

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", address='" + address + '\'' +
                '}';
    }

    public User(Integer id, String username, String address) {
        this.id = id;
        this.username = username;
        this.address = address;
    }

    public User(String username, String address) {
        this.username = username;
        this.address = address;
    }

    public User(Integer id, String username, String address, Date birthday) {
        this.id = id;
        this.username = username;
        this.address = address;
        this.birthday = birthday;
    }

    public User() {
    }


    public User id(Integer id){
        this.id = id;
        return this;
    }

    public User address(String address){
        this.address = address;
        return this;
    }

    public User name(String username){
        this.username = username;
        return this;
    }


    public User build(){
        return this;
    }

    public static User builder(){
        User user = new User();
        return user;
    }
}
